﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Web;

namespace WebApplication.Core.Helpers
{
    public class CmdHelper
    {
        public static void RunCmd(string cmd, bool isShowCommandWindow)
        {
            Process proc = new Process();
            proc.StartInfo = new ProcessStartInfo("cmd", "/c \"" + cmd + "\"");
            if (!isShowCommandWindow)
                proc.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
            proc.Start();
            proc.WaitForExit();
        }
    }
}